<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <title>我的头像</title>
    <link rel="stylesheet" href="../../css/qt/myCenter/per-center.css">
    <script src="../../JS/jquery-1.12.4.js"></script>
    <link rel="stylesheet" href="../../css/qt/myCenter/icon.css">
</head>
<body>

<!-- 顶部导航starting -->
<div class="nav_mark"></div>
<!-- 顶部导航ending -->
<!-- 蓝色图片通栏starting -->
<div class="nav_header">
    <div class="img"></div>
</div>
<!-- 蓝色图片通栏ending -->
<!-- 主体内容starting -->
<div class="content">
    <!-- 左侧栏starting -->
    <div class="left">
        <span class="title">我的头像</span>
        <ul class="sidebar_list">
            <li><a class="cls" href="per_center.php"><span></span>首<b style="width: 31px;display: inline-block;"></b>页</a></li>
            <li><a class="cls" href="myMessge.html"><span></span>我的信息</a></li>
            <li><a class="cls" href="list-icon.php"><span></span>我的头像</a></li>
            <li><a class="cls" href="acc-Security.html"><span></span>帐号安全</a></li>
            <li><a class="cls" href="myComments.html"><span></span>我的留言</a></li>
            <li><a class="cls" href="myAssess.html"><span></span>我的评价</a></li>
        </ul>
    </div>
    <!-- 左侧栏ending -->
    <!-- 左边内容starting -->
    <div class="right" id="main">
<!--  head 通用 starting      -->
        <div class="top_head">
        <h4 class="exp">更换头像</h4>
        </div>
<!--  head 通用 ending      -->

        <div class="list-icon">
            <form action="doIcon.php" method="post" enctype="multipart/form-data">
                <?php
                session_start();
                require ('../../ht/Common/db.php');
                $sql = "select * from users where uname='{$_SESSION["user"]}'";
                $result = mysql_query($sql) or die('查询失败！'.mysql_error());
                $row = mysql_fetch_assoc($result);
                ?>
                <div class="icon-content">
                    <div class="model_cont">
                        <div class="fir_change">
                            <label>
                                <input type="file" style="position: absolute;opacity: 0" name="pic" required="required"><br/>
                                <img STYLE="margin-top: -21px" src="../../images/Font_Icon/上传图片.jpg" width="200" height="250" alt="上传图片">
                            </label>
                        </div>
                        <div class="cen_division">
                            <span class="left"></span>

                        </div>
                        <div class="pre_img">
                         <div class="ori_img">
                             <img style="border-radius: 100%" height="200" width="100%" src="../../images/user/<?php echo $row["pic"]?>" alt="<?php echo $row["uname"]?>">
                         </div>
                            <h3 style="text-align: center;margin-top: 8px;color: #99A2AA">当前头像</h3>
                        </div>
                    </div>
                </div>
           <h3 class="illu" style="text-align: center;font-weight: normal;color: #99A2AA">请选择图片上传：大小200 * 200像素支持JPG、PNG等格式，图片需小于2M</h3>
                <div class="sum" style="text-align: center;margin-top: 40px">
                    <button name="pic" type="submit" style="border: none;font-size: 24px;width: 120px;height: 40px" >更新</button>
                </div>
            </form>
        </div>
    </div>

    <!-- 右边内容ending -->
</div>
<!-- 主体内容ending -->
</body>
</html>